﻿using ClientTools.Library.DataTypes.Umbraco;
using umbraco.cms.businesslogic.web;

namespace ClientTools.Library.Manager
{
    public static class NodeManager
    {
        public static NodeCollection GetNodes(int parentId, bool recursive)
        {
            var docs = parentId == -1 ? Document.GetRootDocuments() : Document.GetChildrenForTree(parentId);
            return docs.ToNodeCollection(recursive);
        }
    }
}